<?php
require_once(dirname(__FILE__)."/../include/admin/uploadfile_data.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <title>上传资料</title>
</head>
<body>
  <div style="width:80%">
    <div>
      <h2 style="color:green">上传资料</h2>
      <form enctype="multipart/form-data" action="#" method="post">
        <h4>文件简介(最大10000个字符)：</h4>
        <textarea name="intra" cols="1" rows="1" style="width:400px;height:200px"></textarea>
        <br />
        <br />
        <input type="hidden" name="MAX_FILE_SIZE" value="120000000" />
        <input type="file" name="userfile" value="选择文件" />
        <input type="submit" name="send" value="开始上传" />
      </form>
    <br />
    <h2 style="color:green">服务器上已存在的文件资料</h2>
    <table style="width:100%; text-align:center" cellspacing="0" cellpadding="0" border="1">
      <tr>
        <th style="padding-left:10px">文件名</th>
        <th style="padding-left:10px">文件大小</th>
        <th style="padding-left:10px">上传人</th>
        <th style="padding-left:10px">上传时间</th>
        <th style="padding-left:10px">下载次数</th>
        <th style="padding-left:10px">上传时IP</th>
        <th style="padding-left:10px">操作</th>
      </tr>
      <?php
        foreach($PageArray["filelist"] as $Object){
      ?>
      <form action="#" method="post">
        <input type="hidden" name="fid" value="<?php echo $Object->id; ?>" />
        <tr>
          <td style="padding-left:10px">
            <a href="<?php echo "./".$Object->src;?>">
              <?php echo $Object->filename; ?></a>
          </td>
          <td style="padding-left:10px">
            <?php printf("%.2fkB", $Object->size/1024); ?></td>
          <td style="padding-left:10px">
            <?php echo $Object->user;?></td>
          <td style="padding-left:10px">
            <?php echo $Object->time;?></td>
          <td style="padding-left:10px">
            <?php echo $Object->downcnt;?></td>
          <td style="padding-left:10px">
            <?php echo $Object->ip;?></td>
          <td style="padding-left:10px">
            <input value="删除" type="submit" name="delete" />
          </td>
        </tr>
      </form>
      <?php }?>
    </table>
  </div>
</div>
</body>
</html>
<?php 
/*
与文件上传有关的文件和选项参数
php.ini
apache.ini
file_uploads:
upload_tmp_dir:
upload_max_filesize:
post_max_size:
max_input_time:
memory_limit:
max_execution_time:
*/
?>